<template>
  <div>
      <h2>{{str}}</h2>
      <button @click="add">添加</button>
    <div class="ig">
        <img src="../assets/LOGO.png" alt="logo">
    </div>
  </div>
</template>

<script>
export default {
    name: "child",
    data() {
        return {
            str: "静态子组件",
        }
    },
    methods: {
        add() {
            this.str += " !";
        }
    },
}
</script>

<style>
    .ig {
        text-align: center;
        margin: 20px;
        border: 2px #fff solid;
        border-radius: 20px;
    }
</style>